import { QL } from 'iflux2'

export const listQL = QL('listQL', [
    'list',
    'orderMapStatus',
    'consigneeMap',
    'initItemPriceMap',
    'tradeOrderMap',
    (list, orderMapStatus, consigneeMap, initItemPriceMap,tradeOrderMap) => list.map(order =>
        order.set('key', order.get('applyId'))
            .set('orderStatus', orderMapStatus.get(order.get('applyId')))//将订单状态合入订单数据中
            .set('consigneeInfo', consigneeMap.get(order.get('tid')))//收货人信息
            .set('tradeOrder',tradeOrderMap.get(order.get('tid')))
            //.update("itemList", itemOrders => itemOrders.map(itemOrder => itemOrder.set('itemInitPrice', initItemPriceMap.get(itemOrder.get('oid')))))
    )
]);

